﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.Master" CodeBehind="Default.aspx.vb" Inherits="RUHResturants._Default" %>

<%@ register assembly="GMaps" namespace="Subgurim.Controles" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            width: 100%;
        }
    .style4
    {
        width: 48px;
    }
        .style5
        {
            width: 100%;
            border-collapse: collapse;
            border: 6px solid #000000;
        }
        .style6
        {
            width: 48px;
            font-weight: bold;
        }
        .style7
        {
            width: 505px;
            font-weight: bold;
        }
        .style8
        {
            width: 505px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style3">
        <tr>
            <td class="style7">
                
                Latest Restaurants Map Locations<td class="style6">
                
                &nbsp;<td>
                <b>Latest Restaurants Added</b><br />
            </td>
        </tr>
        <tr>
            <td class="style8">
                <table class="style5">
                    <tr>
                        <td>
                <cc1:GMap ID="GMap1" runat="server" />
                        </td>
                    </tr>
                </table>&nbsp;</td>
            <td class="style4">
                &nbsp;</td>
            <td>
                <asp:Panel ID="Panel1" runat="server">
                    <asp:GridView ID="GridView1" runat="server" 
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
    CellPadding="4" DataSourceID="LatestRest" ForeColor="#333333" GridLines="None" Width="387px">
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <Columns>
                            <asp:BoundField DataField="RestName" 
            HeaderText="Restaurant Name" SortExpression="RestName" />
                            <asp:BoundField DataField="PriceLevel" 
            HeaderText="Price Level" SortExpression="PriceLevel" />
                            <asp:BoundField DataField="LuxuryLevel" 
            HeaderText="Luxury Level" SortExpression="LuxuryLevel" />
            
                
                  <asp:TemplateField ShowHeader="False">
             <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("rid", "Details.aspx?Id={0}") %>' 
                        Text="Details"></asp:HyperLink>
            </ItemTemplate>
            </asp:TemplateField>
            
                        </Columns>
                        <FooterStyle BackColor="#990000" Font-Bold="True" 
        ForeColor="White" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" 
        HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" 
        ForeColor="Navy" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" 
        ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </asp:Panel>
                <asp:SqlDataSource ID="LatestRest" runat="server" 
                    ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\RUHRestaurantsDB.accdb;Persist Security Info=True" 
                    ProviderName="System.Data.OleDb" 
                    SelectCommand="SELECT TOP 7 RestName, PriceLevel, LuxuryLevel, id as RID FROM Resturants ORDER BY Id DESC">
                </asp:SqlDataSource>
                        </td>
        </tr>
    </table>
</asp:Content>
